package pl.jtb.ctl.tabory.dao.data.vo;

import java.io.Serializable;

public class StationVO implements Serializable, Comparable<StationVO> {

    private static final long serialVersionUID = 1L;
    private Long id;
    private String stationName;
    private boolean active;

    public StationVO() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getStationName() {
        return this.stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public boolean isActive() {
        return this.active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("StationVO [id=");
        builder.append(id);
        builder.append(", stationName=");
        builder.append(stationName);
        builder.append(", active=");
        builder.append(active);
        builder.append("]");
        return builder.toString();
    }

    @Override
    public int compareTo(StationVO o) {
        return this == o ? 0 : 1;
    }

    @Override
    public boolean equals(Object obj) {
        StationVO station = (StationVO) obj;
        return this.id.equals(station.getId());
    }

    @Override
    public int hashCode() {
        int prime = 31;
        return (int) (prime + id.intValue());
    }

}
